import 'package:flutter_deer/generated/json/base/json_field.dart';
import 'package:flutter_deer/generated/json/print_style_config.g.dart';


// 打印样式配置
@JsonSerializable()
class PrintStyleConfig {
  String configKey = '';
  List<PintConfigValue> configValue = [];
  PrintStyleConfig();
  factory PrintStyleConfig.fromJson(Map<String, dynamic> json) => $PrintStyleConfigFromJson(json);
  Map<String, dynamic> toJson() => $PrintStyleConfigToJson(this);

  @override
  String toString() => 'PrintStyleConfig(configKey: $configKey, configValue: $configValue)';
}
@JsonSerializable()
class PintConfigValue {
  String typeName = '';
  bool choose = false;
  List<BaseShiftSetting> list = [];
  String typeCode = '';
  String valueCode = '';
  PintConfigValue();
  factory PintConfigValue.fromJson(Map<String, dynamic> json) => $PintConfigValueFromJson(json);
  Map<String, dynamic> toJson() => $PintConfigValueToJson(this);

  @override
  String toString() => 'PintConfigValue(typeName: $typeName, choose: $choose, typeCode: $typeCode, valueCode: $valueCode)';
}
@JsonSerializable()
class BaseShiftSetting {
  String defaultCheckboxCode = '';
  String itemCode = '';
  bool choose = false;
  List<ItemPrintSetting> itemList = [];
  List<String> chooseCheckboxCodes = [];
  String valueCode = '';
  BaseShiftSetting();
  factory BaseShiftSetting.fromJson(Map<String, dynamic> json) => $BaseShiftSettingFromJson(json);
  Map<String, dynamic> toJson() => $BaseShiftSettingToJson(this);

  @override
  String toString() => 'BaseShiftSetting(itemCode: $itemCode, choose: $choose, valueCode: $valueCode, chooseCheckboxCodes: $chooseCheckboxCodes)';
}
@JsonSerializable()
class ItemPrintSetting {
  String checkboxCode = '';
  String checkboxName = '';
  String checkboxValue = '';
  String valueCode = '';
  ItemPrintSetting();
  factory ItemPrintSetting.fromJson(Map<String, dynamic> json) => $ItemPrintSettingFromJson(json);
  Map<String, dynamic> toJson() => $ItemPrintSettingToJson(this);

  @override
  String toString() => 'ItemPrintSetting(checkboxCode: $checkboxCode, checkboxName: $checkboxName, valueCode: $valueCode)';
}

//抖音券核销打印样式配置
@JsonSerializable()
class PrintCouponStyleBean {
  String couponName = '';
  String goodsQuantity = '';
  String mchGoodsName = '';
  String consumeIntegral = '';
  String payAmount = '';
  // String receiveTime = '';
  // String couponOilName = '';
  PrintCouponStyleBean();
  factory PrintCouponStyleBean.fromJson(Map<String, dynamic> json) => $PrintCouponStyleBeanFromJson(json);
  Map<String, dynamic> toJson() => $PrintCouponStyleBeanToJson(this);

  @override
  String toString() {
    return 'PrintCouponStyleBean(couponName: $couponName, goodsQuantity: $goodsQuantity, '
        'mchGoodsName: $mchGoodsName, consumeIntegral: $consumeIntegral, payAmount: $payAmount)';
  }
}
